//
//  ZYStatusBottomView.swift
//  weibo007
//
//  Created by 陈宗毅 on 15/12/21.
//  Copyright © 2015年 czy. All rights reserved.
//

import UIKit

class ZYStatusBottomView: UIView {

    
    override init(frame: CGRect) {
        super.init(frame: frame)
        backgroundColor = UIColor(white: 0.9, alpha: 1)
        prepareUI()
    }
    
    private func prepareUI(){
        addSubview(forwardButton)
        addSubview(commentButton)
        addSubview(likeButton)
        addSubview(separatorViewOne)
        addSubview(separatorViewTwo)
        
        //添加约束
        //3个按钮水平平铺父控件
        self.ff_HorizontalTile([forwardButton,commentButton,likeButton], insets: UIEdgeInsetsZero)
        //分割线1
        separatorViewOne.ff_AlignHorizontal(type: ff_AlignType.CenterRight, referView: forwardButton, size: nil)
        //分割线2
        separatorViewTwo.ff_AlignHorizontal(type: ff_AlignType.CenterRight, referView: commentButton, size: nil)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    //MARK: - 懒加载
    
    //转发
    private lazy var forwardButton:UIButton = UIButton(imageName: "timeline_icon_retweet", fontSize: 11, title: "转发")

    
    //评论
    private lazy var commentButton:UIButton = UIButton(imageName: "timeline_icon_comment", fontSize: 11, title: "评论")
    
    //赞
    private lazy var likeButton:UIButton = UIButton(imageName: "timeline_icon_unlike", fontSize: 11, title: "赞")
    
    //水平分割线
    private lazy var separatorViewOne:UIImageView = UIImageView(image: UIImage(named: "timeline_card_bottom_line_highlighted"))
    private lazy var separatorViewTwo:UIImageView = UIImageView(image: UIImage(named: "timeline_card_bottom_line_highlighted"))
    

}
